a=[17784 0.36863
19541.3 0.372245
16784.7 0.361813
19392.8 0.37121
17543 0.350755
18264.2 0.356075
18431 0.347246
21324.9 0.355836
17176.3 0.371142
18218.9 0.358611
18631.5 0.369645
18057.8 0.36782
20008.8 0.364362
18781.4 0.353641
18924.7 0.376547
18281.6 0.352581
20407.7 0.366049
15943.3 0.340047
18326.6 0.366326
20815 0.378183
15673 0.355761
20828.2 0.367919
20857 0.368574
16052.8 0.35226
17566.5 0.339405
19878.8 0.354671
18519.5 0.364535];


[m,n]=size(a);

a=[a(:,2),a(:,1)];

[b,order]=sort(a,1);
c=[];
for i=1:m
    c=[c;a(order(i,1),1),a(order(i,1),2)];
end




x=c(:,1);
y=c(:,2);


[p,S] = polyfit(x,y,1);
f = polyval(p,x);
plot(x,y,'o',x,f,'-');


correspoding_value=min(min(corrcoef(x, y)))



